﻿using MathNet.Numerics.LinearAlgebra;
using MathNet.Numerics.LinearAlgebra.Factorization;
using NPOI.SS.Formula.Atp;
using NPOI.SS.Formula.Functions;
using SixLabors.ImageSharp;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.ConstrainedExecution;
using System.Text;
using System.Threading.Tasks;
using static NPOI.HSSF.Util.HSSFColor;
using static System.Net.Mime.MediaTypeNames;

namespace CKS2320.Common.Transfer
{
    public static class TransferDic
    {
        public static string? GetMessage(string messageCode, string languageCode = "zh")
        {
            string? message = string.Empty;
            switch (languageCode.ToLower())
            {
                //这里兼容一下CN
                case "cn":
                case "zh":
                    message = messageCode;
                    break;
                case "en":
                    message = DetectionTransferEN.ResourceManager.GetString(messageCode);
                    break;
                case "es":
                    message = DetectionTransferES.ResourceManager.GetString(messageCode);
                    break;
                default:
                    message = messageCode;
                    break;
            }
            return message;
        }
        public static string GetlanguageText(string messageCode, string languageCode = "zh")
        {
            string message = string.Empty;
            if (string.IsNullOrEmpty(messageCode))
            {
                return "";
            }
            messageCode = messageCode.Trim().Replace("\r", string.Empty).Replace("\n", string.Empty);
            string language = languageCode.ToLower();
            if (language == "cn" || language == "zh")
            {
                return messageCode;
            }
            switch (messageCode)
            {


                case "【通讯异常】主站IO设备通讯故障":
                    if (language == "en")
                        message = "[Communication error] Main station IO Equipment communication failure";
                    else
                        message = "[Error Comunicación]Estacion principal IO del equipo";
                    break;

                case "【通讯异常】R1-机器人伺服轴通讯故障":
                    if (language == "en")
                        message = "[Communication error] R1-Robot servo axis communication failure";
                    else
                        message = "[Error Comunicación] R1-Servoeje del robot";
                    break;
                case "【通讯异常】R2-机器人伺服轴通讯故障":
                    if (language == "en")
                        message = "[Communication error]R2-Robot servo axis communication failure";
                    else
                        message = "[Error Comunicación]R2-Fallo de comunicación del servoeje del robot";
                    break;
                case "【通讯异常】R3-机器人伺服轴通讯故障":
                    if (language == "en")
                        message = "[Communication error]R3-Robot servo axis communication failure";
                    else
                        message = "[Error Comunicación]R3-Fallo de comunicación del servoeje del robot";
                    break;
                case "【通讯异常】R4-机器人伺服轴通讯故障":
                    if (language == "en")
                        message = "[Communication error]R4-Robot servo axis communication failure";
                    else
                        message = "[Error Comunicación]R4-Fallo de comunicación del servoeje del robot";
                    break;
                case "【通讯异常】料盘料框_1#IO网关通讯故障":
                    if (language == "en")
                        message = "[Communication error] Material tray material frame_1#Communication error in IO gateway";
                    else
                        message = "[Error Comunicación] Layer_1#En la puerta de enlace IO";
                    break;
                case "【通讯异常】R1-机器人夹爪IO网关故障":
                    if (language == "en")
                        message = "[Communication error]R1-Robot gripper IO gateway failure";
                    else
                        message = "[Error Comunicación]R1-En la puerta de enlace IO de la pinza del robot";
                    break;
                case "【通讯异常】R2-机器人夹爪IO网关故障":
                    if (language == "en")
                        message = "[Communication error]R2-Robot gripper IO gateway failure";
                    else
                        message = "[Error Comunicación]R2-En la puerta de enlace IO de la pinza del robot";
                    break;
                case "【通讯异常】R3-机器人夹爪IO网关故障":
                    if (language == "en")
                        message = "[Communication error]R3-Robot gripper IO gateway failure\r\n";
                    else
                        message = "[Error Comunicación]R3-En la puerta de enlace IO de la pinza del robot\r\n";
                    break;
                case "【通讯异常】R4-机器人夹爪IO网关故障":
                    if (language == "en")
                        message = "[Communication error]R4-Robot gripper IO gateway failure\r\n";
                    else
                        message = "[Error Comunicación]R4-En la puerta de enlace IO de la pinza del robot\r\n";
                    break;
                case "【通讯异常】R1-机器人通讯故障":
                    if (language == "en")
                        message = "[Communication error]R1-Robot communication failure";
                    else
                        message = "[Error Comunicación]R1-Fallo de comunicación del robot";
                    break;
                case "【通讯异常】R2-机器人通讯故障":
                    if (language == "en")
                        message = "[Communication error]R2-Robot communication failure";
                    else
                        message = "[Error Comunicación]R2-Fallo de comunicación del robot";
                    break;
                case "【通讯异常】R3-机器人通讯故障":
                    if (language == "en")
                        message = "[Communication error]R3-Robot communication failure";
                    else
                        message = "[Error Comunicación]R3-Fallo de comunicación del robot";
                    break;
                case "【通讯异常】R4-机器人通讯故障":
                    if (language == "en")
                        message = " [Communication error]R4-Robot communication failure";
                    else
                        message = "[Error Comunicación]R4-Fallo de comunicación del robot";
                    break;
                case "【通讯异常】料盘料框_2#IO网关通讯故障":
                    if (language == "en")
                        message = "[Communication error] Material tray material frame_2#Communication error in IO gateway";
                    else
                        message = "[Error Comunicación] Layer_2#En la puerta de enlace IO\t";
                    break;
                case "【急停】固定HMI位置":
                    if (language == "en")
                        message = "[Emergency Stop] HMI Fixed Position";
                    else
                        message = "[P.Emerg.] Posición fija de HMI";
                    break;
                case "【急停】移动HIM位置":
                    if (language == "en")
                        message = "L[Emergency Stop]Move the position of HIM";
                    else
                        message = "[P.Emerg.]Mover la posición de É";
                    break;
                case "【急停】1#安全门位置":
                    if (language == "en")
                        message = "[Emergency stop] 1# safety door position";
                    else
                        message = "[P. Emerg.] 1# posición de la Pta Seguridad";
                    break;
                case "【急停】2#安全门位置":
                    if (language == "en")
                        message = "[Emergency stop] Safety door position 2#";
                    else
                        message = "[P. Emerg.] Posición de la Pta Seguridad 2#";
                    break;
                case "【急停】3#安全门位置":
                    if (language == "en")
                        message = "[Emergency stop] Safety door position 3#";
                    else
                        message = "[P. Emerg.] Posición de la Pta Seguridad 3#";
                    break;
                case "【急停】4#安全门位置":
                    if (language == "en")
                        message = "[Emergency stop] Safety door position 4#";
                    else
                        message = "[P. Emerg.] Posición de la Pta Seguridad 4#";
                    break;
                case "急停按下需复位":
                    if (language == "en")
                        message = " Press emergency stop to reset";
                    else
                        message = "Pulse P.Emerg.para restablecer";
                    break;
                case "【安全门打开】1#安全门":
                    if (language == "en")
                        message = "[Security door open] 1# security door";
                    else
                        message = "[Abierta Pta Seguridad] 1# Pta";
                    break;
                case "【安全门打开】2#安全门":
                    if (language == "en")
                        message = "[Security door open] 2# security door";
                    else
                        message = "[Abierta Pta Seguridad] 2# Pta";
                    break;
                case "【安全门打开】3#安全门":
                    if (language == "en")
                        message = "[Security door open] 3# security door";
                    else
                        message = "[Abierta Pta Seguridad] 3# Pta";
                    break;
                case "【安全门打开】4#安全门":
                    if (language == "en")
                        message = "[Security door open] 4# security door";
                    else
                        message = "[Abierta Pta Seguridad] 4# Pta";
                    break;

                case "【通信异常】主PLC与上位机通信异常":
                    if (language == "en")
                        message = "Communication abnormality between the main PLC and the upper computer";
                    else
                        message = "[comunicación anormal] la comunicación entre el controlador lógico automático principal y el ordenador superior es Anormal.";
                    break;
                case "【光栅触发】光栅1_R1区域":
                    if (language == "en")
                        message = "[Safety Bar Enabled]Safety Bar1_R1";
                    else
                        message = "[Activada Barra]Barra de seguridad1_R1";
                    break;
                case "【光栅触发】光栅2_R1区域":
                    if (language == "en")
                        message = "[Safety Bar Enabled]Safety Bar2_R1";
                    else
                        message = "[Activada Barra]Barra de seguridad2_R1";
                    break;
                case "【光栅触发】光栅4_R4区域":
                    if (language == "en")
                        message = "[Safety Bar Enabled]Safety Bar4_R4";
                    else
                        message = "[Activada Barra]Barra de seguridad4_R4";
                    break;
                case "【光栅触发】光栅3_R4区域":
                    if (language == "en")
                        message = "[Safety Bar Enabled]Safety Bar3_R4";
                    else
                        message = "[Activada Barra]Barra de seguridad3_R4";
                    break;
                case "【光栅触发】光栅5_R2区域":
                    if (language == "en")
                        message = "[Safety Bar Enabled]Safety Bar5_R2";
                    else
                        message = " [Activada Barra]Barra de seguridad5_R2";
                    break;
                case "【光栅触发】光栅6_R2区域":
                    if (language == "en")
                        message = "[Safety Bar Enabled]Safety Bar6_R2";
                    else
                        message = "[Activada Barra]Barra de seguridad6_R2";
                    break;
                case "【提示】未选择模式！在自动控制-系统初始化页面选择。":
                    if (language == "en")
                        message = "[Tip] No mode has been selected! Select on the page Automatic Control-System Initialization.";
                    else
                        message = "[Advertencia] Ningún modo seleccionado.En página Control automático-Inicialización del sistema";
                    break;
                case "绿件未准备好":
                    if (language == "en")
                        message = " Master sample is not ready";
                    else
                        message = " Master sample no está listo";
                    break;
                case "红件未准备好":
                    if (language == "en")
                        message = "Red rabbit not ready";
                    else
                        message = "Red rabbit no lista";
                    break;
                case "【伺服未回零】R1-机器人夹爪伺服回原点未完成":
                    if (language == "en")
                        message = "[Servo does not return to zero]R1-Return of the robot gripper servo to the origin has not been completed";
                    else
                        message = "[Servo no a cero]R1-Retorno Pinza servo al origen no completado";
                    break;
                case "【伺服未回零】R2-机器人夹爪伺服回原点未完成":
                    if (language == "en")
                        message = "[Servo does not return to zero]R2-The robot gripper servo return to the origin has not completed";
                    else
                        message = "[Servo no a cero]R2-Retorno Pinza servo al origen no completado";
                    break;
                case "【伺服未回零】R3-机器人夹爪伺服回原点未完成":
                    if (language == "en")
                        message = "[Servo does not return to zero]R3-Return of the robot gripper servo to the origin has not been completed";
                    else
                        message = "[Servo no a cero]R3-Retorno Pinza servo al origen no completado";
                    break;
                case "【伺服未回零】R4-机器人夹爪伺服回原点未完成":
                    if (language == "en")
                        message = "[Servo does not return to zero]R4-The robot gripper servo return to the origin has not been completed";
                    else
                        message = "[Servo no a cero]R4-Retorno Pinza servo al origen no completado";
                    break;
                case "【伺服轴故障】R1-机器人夹爪伺服轴故障":
                    if (language == "en")
                        message = "[Servo axis failure]R1-Robot gripper servo axis failure";
                    else
                        message = "[Falla Servoeje]R1-pinza del robot";
                    break;
                case "【伺服轴故障】R2-机器人夹爪伺服轴故障":
                    if (language == "en")
                        message = "[Servo axis failure]R2-Robot gripper servo axis failure";
                    else
                        message = "[Falla Servoeje]R2-pinza del robot";
                    break;
                case "【伺服轴故障】R3-机器人夹爪伺服轴故障":
                    if (language == "en")
                        message = "[Servo axis failure]R3-Robot gripper servo axis failure";
                    else
                        message = "[Falla Servoeje]R3-pinza del robot";
                    break;
                case "【伺服轴故障】R4-机器人夹爪伺服轴故障":
                    if (language == "en")
                        message = "[Servo axis failure]R4-Robot gripper servo axis failure";
                    else
                        message = "[Falla Servoeje]R4-pinza del robot";
                    break;
                case "【夹爪有料】R1_机器人夹爪有料初始化报警":
                    if (language == "en")
                        message = "[Gripper with material]R1_The robot gripper has a material initialization alarm";
                    else
                        message = "[Pinza con tubo]R1_Alarma de inicialización por haber material";
                    break;
                case "【夹爪有料】R2_-机器人夹爪有料初始化报警":
                    if (language == "en")
                        message = "[Gripper with material]R2_The robot gripper has a material initialization alarm";
                    else
                        message = "[Pinza con tubo]R2_Alarma de inicialización por haber material";
                    break;
                case "【夹爪有料】R3_-机器人夹爪有料初始化报警":
                    if (language == "en")
                        message = "[Gripper with material]R3_The robot gripper has a material initialization alarm";
                    else
                        message = "[Pinza con tubo]R3_Alarma de inicialización por haber material";
                    break;
                case "【夹爪有料】R4_-机器人夹爪有料初始化报警":
                    if (language == "en")
                        message = "[Gripper with material]R4_The robot gripper has a material initialization alarm";
                    else
                        message = "[Pinza con tubo]R4_Alarma de inicialización por haber material";
                    break;
                case "ST1_故障中":
                    if (language == "en")
                        message = "ST1_ Fault in progress";
                    else
                        message = "St1 en avería";
                    break;
                case "ST2_故障中":
                    if (language == "en")
                        message = "ST2_ Fault in progress";
                    else
                        message = "St2 en avería";
                    break;
                case "ST3_故障中":
                    if (language == "en")
                        message = "ST3_ Fault in progress";
                    else
                        message = "St3 en avería";
                    break;
                case "【动作超时】R1_固定侧_管夹爪":
                    if (language == "en")
                        message = "[Action waiting time]R1_ Fixed side _Pipe clamp";
                    else
                        message = " [Tiempo Excedido]R1_Lado fijo_Pinza de tubo";
                    break;
                case "【动作超时】R1_固定侧_框夹爪":
                    if (language == "en")
                        message = "[Action waiting time]R1_ Fixed side _Layer clamp";
                    else
                        message = "[Tiempo Excedido]R1_Lado fijo_Pinza de Layer";
                    break;
                case "【动作超时】R1_固定侧_折叠气缸":
                    if (language == "en")
                        message = "[Action waiting time]R1_ Fixed side _Folding cylinder";
                    else
                        message = "[Tiempo Excedido]R1_Lado fijo_Cilindro plegable";
                    break;
                case "【动作超时】R1_固定侧_滑台气缸":
                    if (language == "en")
                        message = "[Action waiting time]R1_ Fixed side _Sliding cylinder";
                    else
                        message = "R1_Lado fijo_Cilindro deslizante";
                    break;
                case "【动作超时】R1_固定侧_水平气缸":
                    if (language == "en")
                        message = "R1_ Fixed side _Horizontal cylinder";
                    else
                        message = "R1_Lado fijo_Cilindro horizontal";
                    break;
                case "【动作超时】R1_移动侧_管夹爪":
                    if (language == "en")
                        message = " [Action timeout]R1_Moving side_Tube clamp";
                    else
                        message = "[Tiempo Excedido]R1_Lado móvil_Pinza de tubo";
                    break;
                case "【动作超时】R1_移动侧_框夹爪":
                    if (language == "en")
                        message = "[Action timeout]R1_Moving side_Layer clamp";
                    else
                        message = "[Tiempo Excedido]R1_Lado móvil_Pinza de Layer";
                    break;
                case "【动作超时】R1_移动侧_折叠气缸":
                    if (language == "en")
                        message = "[Action waiting time]R1_Moving side_Folding cylinder";
                    else
                        message = "[Tiempo Excedido]R1_Lado móvil_Cilindro plegable";
                    break;
                case "【动作超时】R1_移动侧_水平气缸":
                    if (language == "en")
                        message = "[Action waiting time]R1_Moving side_Horizontal cylinder";
                    else
                        message = "[Tiempo Excedido]R1_Lado móvil_Cilindro horizontal";
                    break;
                case "【动作超时】R1_移动侧_滑台气缸":
                    if (language == "en")
                        message = "[Action waiting time]R1_Moving side_Sliding cylinder";
                    else
                        message = "[Tiempo Excedido]R1_Lado móvil_Cilindro deslizante";
                    break;
                case "【动作超时】R2_固定侧_管夹爪":
                    if (language == "en")
                        message = "[Action timeout]R2_ Fixed side _Pipe clamp";
                    else
                        message = "[Tiempo Excedido]R2_Lado fijo_Pinza de tubo";
                    break;
                case "【动作超时】R2_固定侧_框夹爪":
                    if (language == "en")
                        message = "[Action timeout]R2_ Fixed side _Layer clamp";
                    else
                        message = "[Tiempo Excedido]R2_Lado fijo_Pinza de Layer";
                    break;
                case "【动作超时】R2_固定侧_折叠气缸":
                    if (language == "en")
                        message = "[Action timeout]R2_ Fixed side _Folding cylinder";
                    else
                        message = "[Tiempo Excedido]R2_Lado fijo_Cilindro plegable";
                    break;
                case "【动作超时】R2_固定侧_滑台气缸":
                    if (language == "en")
                        message = "[Action waiting time]R2_ Fixed side _Sliding cylinder";
                    else
                        message = "[Tiempo Excedido]R2_Lado fijo_Cilindro deslizante";
                    break;
                case "【动作超时】R2_固定侧_水平气缸":
                    if (language == "en")
                        message = "[Action waiting time]R2_ Fixed side _Horizontal cylinder";
                    else
                        message = "[Tiempo Excedido]R2_Lado fijo_Cilindro horizontal";
                    break;
                case "【动作超时】R2_移动侧_管夹爪":
                    if (language == "en")
                        message = "[Action timeout]R2_Moving side_Tube clamp";
                    else
                        message = "[Tiempo Excedido]R2_Lado móvil_Pinza de tubo";
                    break;
                case "【动作超时】R2_移动侧_框夹爪":
                    if (language == "en")
                        message = "[Action Timeout]R2_Moving Side_Layer Gripper";
                    else
                        message = "[Tiempo Excedido]R2_Lado móvil_Pinza de Layer";
                    break;
                case "【动作超时】R2_移动侧_折叠气缸":
                    if (language == "en")
                        message = "[Action waiting time]R2_Moving side_Folding cylinder";
                    else
                        message = "[Tiempo Excedido]R2_Lado móvil_Cilindro plegable";
                    break;
                case "【动作超时】R2_移动侧_水平气缸":
                    if (language == "en")
                        message = "[Action waiting time]R2_Moving side_Horizontal cylinder";
                    else
                        message = "[Tiempo Excedido]R2_Lado móvil_Cilindro horizontal";
                    break;
                case "【动作超时】R2_移动侧_滑台气缸":
                    if (language == "en")
                        message = "[Action waiting time]R2_Moving side_Sliding cylinder";
                    else
                        message = "[Tiempo Excedido]R2_Lado móvil_Cilindro deslizante";
                    break;
                case "【动作超时】R3_固定侧_管夹爪":
                    if (language == "en")
                        message = "[Action waiting time]R3_ Fixed side _Pipe clamp";
                    else
                        message = "[Tiempo Excedido]R3_Lado fijo_Pinza de tubo";
                    break;
                case "【动作超时】R3_固定侧_框夹爪":
                    if (language == "en")
                        message = "[Action waiting time]R3_ Fixed side _Layer clamp";
                    else
                        message = "[Tiempo Excedido]R3_Lado fijo_Pinza de Layer";
                    break;
                case "【动作超时】R3_固定侧_折叠气缸":
                    if (language == "en")
                        message = "[Action waiting time]R3_ Fixed side _Folding cylinder";
                    else
                        message = "[Tiempo Excedido]R3_Lado fijo_Cilindro plegable";
                    break;
                case "【动作超时】R3_固定侧_滑台气缸":
                    if (language == "en")
                        message = "[Action waiting time]R3_ Fixed side _Sliding cylinder";
                    else
                        message = "[Tiempo Excedido]R3_Lado fijo_Cilindro deslizante";
                    break;
                case "【动作超时】R3_固定侧_水平气缸":
                    if (language == "en")
                        message = "[Action waiting time]R3_ Fixed side _Horizontal cylinder";
                    else
                        message = "[Tiempo Excedido]R3_Lado fijo_Cilindro horizontal";
                    break;
                case "【动作超时】R3_移动侧_水平气缸":
                    if (language == "en")
                        message = "[Action waiting time]R3_Moving side_Horizontal cylinder";
                    else
                        message = "[Tiempo Excedido]R3_Lado móvil_Cilindro horizontal";
                    break;
                case "【动作超时】R3_移动侧_滑台气缸":
                    if (language == "en")
                        message = "[Action waiting time]R3_Moving side_Sliding cylinder";
                    else
                        message = "[Tiempo Excedido]R3_Lado móvil_Cilindro deslizante";
                    break;
                case "【动作超时】R3_移动侧_框夹爪":
                    if (language == "en")
                        message = "[Action timeout]R3_Moving side_Layer gripper";
                    else
                        message = "[Tiempo Excedido]R3_Lado móvil_Pinza de Layer";
                    break;
                case "【动作超时】R3_移动侧_管夹爪":
                    if (language == "en")
                        message = " [Action timeout]R3_Moving side_Tube clamp";
                    else
                        message = " [Tiempo Excedido]R3_Lado móvil_Pinza de tubo";
                    break;
                case "【动作超时】R3_移动侧_折叠气缸":
                    if (language == "en")
                        message = "[Action waiting time]R3_Moving side_Folding cylinder";
                    else
                        message = "[Tiempo Excedido]R3_Lado móvil_Cilindro plegable";
                    break;
                case "【动作超时】R4_固定侧_管夹爪":
                    if (language == "en")
                        message = "[Action waiting time]R4_ Fixed side _Pipe clamp";
                    else
                        message = "[Tiempo Excedido]R4_Lado fijo_Pinza de tubo";
                    break;
                case "【动作超时】R4_固定侧_框夹爪":
                    if (language == "en")
                        message = "[Action waiting time]R4_ Fixed side _Layer clamp";
                    else
                        message = "[Tiempo Excedido]R4_Lado fijo_Pinza de Layer";
                    break;
                case "【动作超时】R4_固定侧_折叠气缸":
                    if (language == "en")
                        message = "[Action timeout]R4_ Fixed side _Folding cylinder";
                    else
                        message = "[Tiempo Excedido]R4_Lado fijo_Cilindro plegable";
                    break;
                case "【动作超时】R4_固定侧_滑台气缸":
                    if (language == "en")
                        message = "[Action waiting time]R4_ Fixed side _Sliding cylinder";
                    else
                        message = "[Tiempo Excedido]R4_Lado fijo_Cilindro deslizante";
                    break;
                case "【动作超时】R4_固定侧_水平气缸":
                    if (language == "en")
                        message = "[Action waiting time]R4_ Fixed side _Horizontal cylinder";
                    else
                        message = "[Tiempo Excedido]R4_Lado fijo_Cilindro horizontal";
                    break;
                case "【动作超时】R4_移动侧_管夹爪":
                    if (language == "en")
                        message = "[Action timeout]R4_Moving side_Tube clamp";
                    else
                        message = "[Tiempo Excedido]R4_Lado móvil_Pinza de tubo";
                    break;
                case "【动作超时】R4_移动侧_框夹爪":
                    if (language == "en")
                        message = "[Action timeout]R4_Moving side_Layer gripper";
                    else
                        message = "[Tiempo Excedido]R4_Lado móvil_Pinza de Layer";
                    break;
                case "【动作超时】R4_移动侧_折叠气缸":
                    if (language == "en")
                        message = "[Action waiting time]R4_Moving side_Folding cylinder";
                    else
                        message = "[Tiempo Excedido]R4_Lado móvil_Cilindro plegable";
                    break;
                case "【动作超时】R4_移动侧_水平气缸":
                    if (language == "en")
                        message = "[Action waiting time]R4_Moving side_Horizontal cylinder";
                    else
                        message = "[Tiempo Excedido]R4_Lado móvil_Cilindro horizontal";
                    break;
                case "【动作超时】R4_移动侧_滑台气缸":
                    if (language == "en")
                        message = "[Action waiting time]R4_Moving side_Sliding cylinder";
                    else
                        message = "[Tiempo Excedido]R4_Lado móvil_Cilindro deslizante";
                    break;
                case "【小车不在位】R1_上料位":
                    if (language == "en")
                        message = "[Carriage is not in place] R1_loading position";
                    else
                        message = "[Trolley no en posición] R1_Posición de carga";
                    break;
                case "【小车不在位】R1_空盘位":
                    if (language == "en")
                        message = "[Cart is not in place] R1_empty tray";
                    else
                        message = "[Trolley no en posición] R1_Layer vacio";
                    break;
                case "【小车不在位】R2_NG下料位":
                    if (language == "en")
                        message = "[Carriage is not in place] Unloading position R2_NG";
                    else
                        message = "[Trolley no en posición] R2_NG Posición de descarga";
                    break;
                case "【小车不在位】R2_空盘位":
                    if (language == "en")
                        message = "[Cart is not in place] R2_empty tray";
                    else
                        message = "[Trolley no en posición] R2_Layer vacio";
                    break;
                case "【小车不在位】R4_下料位":
                    if (language == "en")
                        message = "[Carriage is not in place] R4_discharge position";
                    else
                        message = "[Trolley no en posición] R4_posición de descarga";
                    break;
                case "【小车不在位】R4_空盘位":
                    if (language == "en")
                        message = "[The car is not in place] R4_empty tray";
                    else
                        message = "[Trolley no en posición] R4_Layer vacio";
                    break;
                case "【抽屉不在位】抽屉2_异常":
                    if (language == "en")
                        message = "[Drawer not in place] Drawer 1_not in working position";
                    else
                        message = " [Cajón no en su lugar] Cajón 1_no en posición de trabajo";
                    break;
                case "【抽屉不在位】抽屉1_异常":
                    if (language == "en")
                        message = "[Drawer not in place] Drawer 2_not in working position";
                    else
                        message = "[Cajón no en su lugar] Cajón 2_no en posición de trabajo";
                    break;	

     case "外围_产品料车入口光栅反馈（上料区）":
                    if (language == "en")
                        message = "Peripheral _ Product material truck entrance grating feedback (loading area)";
                    else
                        message = "Retroalimentación de la rejilla de entrada del camión de carga del producto periférico (área de carga)";
                    break;
                case "外围_料盘料车入口光栅反馈（上料区）":
                    if (language == "en")
                        message = "Peripheral material tray material cart entrance grating feedback (loading area)";
                    else
                        message = "Retroalimentación de la rejilla de entrada del camión de bandeja periférica (área de carga)";
                    break;
                case "外围_产品料车入口光栅反馈（下料区）":
                    if (language == "en")
                        message = "Periphery_Product material truck entrance grating feedback (discharge area)";
                    else
                        message = "Retroalimentación de rejilla de entrada de camiones de productos periféricos (área de descarga)";
                    break;
                case "外围_料盘料车入口光栅反馈（下料区）":
                    if (language == "en")
                        message = "Peripheral material tray and material cart entrance grating feedback (discharge area)";
                    else
                        message = "Retroalimentación de la rejilla de entrada del camión de bandeja periférica (área de descarga)";
                    break;
                case "外围_料件料车入口光栅反馈（耐压检测NG区）":
                    if (language == "en")
                        message = "Peripheral Component Car Entrance Grating Feedback (NG Zone for Voltage Resistance Testing)";
                    else
                        message = "Retroalimentación de la rejilla de entrada del vehículo de material periférico (zona ng de detección de presión)";
                    break;
                case "外围_料盘料车入口光栅反馈（耐压检测NG区）":
                    if (language == "en")
                        message = "Peripheral material tray and material cart entrance grating feedback (pressure test NG area)";
                    else
                        message = "Retroalimentación de la rejilla de entrada del camión de bandeja periférica (zona ng de detección de presión)";
                    break;

                case "外围_1#安全门未插入反馈":
                    if (language == "en")
                        message = "Peripheral 1 # safety door not inserted feedback";
                    else
                        message = "Perimetral 1 ¿ la puerta de Seguridad no ha insertado comentarios";
                    break;
                case "外围_2#安全门未插入反馈":
                    if (language == "en")
                        message = "Peripheral 2 # safety door not inserted feedback";
                    else
                        message = "Perimetral 2 ¿ la puerta de Seguridad no ha insertado comentarios";
                    break;
                case "外围_3#安全门未插入反馈":
                    if (language == "en")
                        message = "Peripheral 3 # safety door not inserted feedback";
                    else
                        message = "Perimetral 3 ¿ la puerta de Seguridad no ha insertado comentarios";
                    break;
                case "外围_4#安全门未插入反馈":
                    if (language == "en")
                        message = "Peripheral 4 # safety door not inserted feedback";
                    else
                        message = "Perimetral 4 ¿ la puerta de Seguridad no ha insertado comentarios";
                    break;
                case "【料车异常】放置耐压NG区":
                    if (language == "en")
                        message = "[Abnormal material truck] Placing pressure resistant NG area";
                    else
                        message = "[anomalía del camión de carga] coloque la zona ng resistente a la presión";
                    break;

                case "【层数错误】上料线产品区层数错误":
                    if (language == "en")
                        message = "[No.of layers error] No.of layers error in the product area of the loading line";
                    else
                        message = "[Error Layers] Area de producto de la línea de carga";
                    break;
                case "【层数错误】上料线料盘区层数错误":
                    if (language == "en")
                        message = "[No.of layers error]No.of layers error in the load line layer area";
                    else
                        message = "[Error Layers]Area de Layer de linea de carga";
                    break;
                case "【层数错误】耐压NG放置区层数错误":
                    if (language == "en")
                        message = "[No.of Layers Error] HIPOT NG Placement Area No.of Layers Error";
                    else
                        message = "[Error Layers] Area de colocación de HIPOT NG";
                    break;
                case "【层数错误】耐压NG料盘区层数错误":
                    if (language == "en")
                        message = "[Layer No.Error] HIPOT NG material layer layer No. error";
                    else
                        message = "[Error Layers] Layers de material HIPOT NG";
                    break;
                case "【层数错误】下料线产品放置区层数错误":
                    if (language == "en")
                        message = "[No.of layers error] No.of layers error in the product placement area of the discharge line";
                    else
                        message = "[Error Layers] Area de colocación de tubos de línea de descarga";
                    break;
                case "【层数错误】下料线料盘放置区层数错误":
                    if (language == "en")
                        message = "[No.of layers error] No.of layers error in the discharge line tray placement area";
                    else
                        message = "[Error Layers]Area de colocación de Layers de línea de descarga";
                    break;
                case "R1-故障报警（请检查夹示教器报警文本）":
                    if (language == "en")
                        message = "R1-Fault alarm(check teaching pendant alarm text)";
                    else
                        message = "R1-Alarma de falla(verifique el texto de alarmas del Pendant)";
                    break;
                case "R2-故障报警（请检查夹示教器报警文本）":
                    if (language == "en")
                        message = " R2-Fault alarm(check teaching pendant alarm text)";
                    else
                        message = "R2-Alarma de falla(verifique el texto de alarmas del Pendant)";
                    break;
                case "R3-故障报警（请检查夹示教器报警文本）":
                    if (language == "en")
                        message = "R3-Fault alarm(check teaching pendant alarm text)";
                    else
                        message = "R3-Alarma de falla(verifique el texto de alarmas del Pendant)";
                    break;
                case "R4-故障报警（请检查夹示教器报警文本）":
                    if (language == "en")
                        message = "R4-Fault alarm(check teaching pendant alarm text)";
                    else
                        message = "R4-Alarma de falla(verifique el texto de alarmas del Pendant)";
                    break;
                case "【急停】R1-控制柜急停异常":
                    if (language == "en")
                        message = "  [Emergency stop]R1-Control board emergency stop abnormality";
                    else
                        message = " [P.Emerg.]R1-Anormalidad de Tablero[Emergency stop]";
                    break;
                case "【急停】R1-示教器急停异常":
                    if (language == "en")
                        message = " [Emergency stop]R1-Teaching Pendant Emergency Stop Abnormality";
                    else
                        message = " [P.Emerg.]R1-Anormalidad de Pendant[Emergency Stop]";
                    break;
                case "【急停】R2-控制柜急停异常":
                    if (language == "en")
                        message = " [Emergency stop]R2-Control board emergency stop abnormality";
                    else
                        message = " [P.Emerg.]R2-Anormalidad de Tablero[Emergency stop]";
                    break;
                case "【急停】R2-示教器急停异常":
                    if (language == "en")
                        message = " [Emergency stop]R2-Teaching Pendant Emergency Stop Abnormality";
                    else
                        message = "[P.Emerg.]R2-Anormalidad de Pendant[Emergency Stop]";
                    break;
                case "【急停】R3-控制柜急停异常":
                    if (language == "en")
                        message = "[Emergency stop] R3-Control board emergency stop abnormality";
                    else
                        message = "[P.Emerg.] R3-Anormalidad de Tablero";
                    break;
                case "【急停】R3-示教器急停异常":
                    if (language == "en")
                        message = "[Emergency Stop] R3-Teaching Pendant Emergency Stop Abnormality";
                    else
                        message = "[P.Emerg.] R3-Anormalidad de Pendant";
                    break;
                case "【急停】R4-控制柜急停异常":
                    if (language == "en")
                        message = "[Emergency stop] R4-Control board emergency stop abnormality";
                    else
                        message = "[P.Emerg.] R4-Anormalidad de Tablero";
                    break;
                case "【急停】R4-示教器急停异常":
                    if (language == "en")
                        message = "[Emergency Stop] R4-Teaching Pendant Emergency Stop Abnormality";
                    else
                        message = "[P.Emerg.] R4-Anormalidad de Pendant";
                    break;
                case "【气源压力异常】R1":
                    if (language == "en")
                        message = "[Abnormal air source pressure]R1";
                    else
                        message = "[Presión anormal] Aire fuente R1";
                    break;
                case "【气源压力异常】R2":
                    if (language == "en")
                        message = "[Abnormal air source pressure]R2";
                    else
                        message = "[Presión anormal] Aire fuente R2";
                    break;
                case "【气源压力异常】R3":
                    if (language == "en")
                        message = "[Abnormal pressure of air source]R3";
                    else
                        message = "[Presión anormal] Aire fuente R3";
                    break;
                case "【气源压力异常】R4":
                    if (language == "en")
                        message = "[Abnormal pressure of air source]R4";
                    else
                        message = "[Presión anormal] Aire fuente R4";
                    break;
                case "【通讯异常】OP10_IO设备通讯故障":
                    if (language == "en")
                        message = "[Error Comunicación]OP10_IO Fallo de comunicación del equipo";
                    else
                        message = "[Error Comunicación]OP10_IO Fallo de comunicación del equipo";
                    break;
                case "【通讯异常】OP10_A_伺服":
                    if (language == "en")
                        message = "[Communication error]OP10_A_Servo";
                    else
                        message = "[Error Comunicación]OP10_A_Servo";
                    break;
                case "【通讯异常】OP10_B_伺服":
                    if (language == "en")
                        message = "[Communication error]OP10_B_Servo";
                    else
                        message = "[Error Comunicación]OP10_B_Servo";
                    break;

                case "【通讯异常】OP10_移动测试伺服网络通讯异常":
                    if (language == "en")
                        message = "[Communication error]OP10_Mobile test servo network communication error";
                    else
                        message = "【[Error Comunicación]OP10_Error Comunicación de la red servo de prueba móvil";
                    break;
                case "【通讯异常】OP10_检测传感器通讯异常":
                    if (language == "en")
                        message = "[Communication error]OP10_Detection sensor communication error";
                    else
                        message = "[Error Comunicación]OP10_Error Comunicación del sensor de detección";
                    break;

                case "【伺服轴故障】OP10_A_伺服_故障":
                    if (language == "en")
                        message = "[Servo axis failure]OP10_A_Servo_Failure";
                    else
                        message = "[Falla Servoeje]OP10_A_Servo_Falla";
                    break;
                case "【伺服轴故障】OP10_B_伺服_故障":
                    if (language == "en")
                        message = "[Servo axis failure]OP10_B_Servo_Failure";
                    else
                        message = "[Falla Servoeje]OP10_B_Servo_Falla";
                    break;
                case "【伺服轴故障】OP10_移动测试伺服轴故障":
                    if (language == "en")
                        message = "[Servo axis failure]OP10_Moving test servo axis failure";
                    else
                        message = "[Falla Servoeje]OP10_Servoeje de prueba móvil";
                    break;
                case "【伺服未回零】OP10_A_伺服_未回原点":
                    if (language == "en")
                        message = "[Servo does not return to zero]OP10_A_Servo_Not returned to origin";
                    else
                        message = "[Servo no a cero]OP10_A_Servo_No retorna al origen";
                    break;
                case "【伺服未回零】OP10_B_伺服_未回原点":
                    if (language == "en")
                        message = "[Servo does not return to zero]OP10_B_Servo_Not returned to origin";
                    else
                        message = "[Servo no a cero]OP10_B_Servo_No retorna al origen";
                    break;
                case "【伺服轴未回零】OP10_移动测试伺服轴未回原点":
                    if (language == "en")
                        message = "[Servo axis does not return to zero]OP10_Moving test servo axis does not return to origin";
                    else
                        message = "[Servoeje no a cero]OP10_Servoeje de prueba móvil";
                    break;

                case "【动作超时】OP10_A_升降1":
                    if (language == "en")
                        message = " [Action Timeout]OP10_A_Lift1";
                    else
                        message = " [Tiempo Excedido]OP10_A_Elevación1";
                    break;
                case "【动作超时】OP10_A_升降2":
                    if (language == "en")
                        message = "[Action Timeout]OP10_A_Lift2";
                    else
                        message = "[Tiempo Excedido]OP10_A_Elevación2";
                    break;
                case "【动作超时】OP10_A_夹爪":
                    if (language == "en")
                        message = "[Action Timeout]OP10_A_Clamp";
                    else
                        message = "[Tiempo Excedido]OP10_A_Pinza";
                    break;
                case "【动作超时】OP10_B_升降1":
                    if (language == "en")
                        message = "[Action Timeout]OP10_B_Lift1";
                    else
                        message = "[Tiempo Excedido]OP10_B_Elevación1";
                    break;
                case "【动作超时】OP10_B_升降2":
                    if (language == "en")
                        message = "[Action Timeout]OP10_B_Lift2";
                    else
                        message = "[Tiempo Excedido]OP10_B_Elevación2";
                    break;
                case "【动作超时】OP10_B_夹爪":
                    if (language == "en")
                        message = "[Action Timeout]OP10_B_Clamp";
                    else
                        message = "[Tiempo Excedido]OP10_B_Pinza";
                    break;
                case "【动作超时】OP10_A_扫码":
                    if (language == "en")
                        message = "[Action Timeout]OP10_A_Scan Code";
                    else
                        message = "[Tiempo Excedido]OP10_A_Escanear QR";
                    break;
                case "【动作超时】OP10_B_扫码":
                    if (language == "en")
                        message = "[Action Timeout]OP10_B_Scan Code";
                    else
                        message = "[Tiempo Excedido]OP10_B_Escanear QR";
                    break;

                case "【产品在位检测异常】OP10_B_在位传感器":
                    if (language == "en")
                        message = "[Product position detection failure]OP10_B_Sensor in position";
                    else
                        message = "[Error detección Posición]OP10_B_Sensor en posición";
                    break;
                case "【产品在位检测异常】OP10_A_在位传感器":
                    if (language == "en")
                        message = "[Product in place detection abnormality] OP10_A in place sensor";
                    else
                        message = "[detección anormal del producto en su lugar] sensor en su lugar op10 a";
                    break;
                case "【二维码异常】OP10_B_QR code_Unknow":
                    if (language == "en")
                        message = "[QR code error]OP10_B_QRcode_Unknown";
                    else
                        message = "[Error QR]OP10_B_QRcode_Unknow";
                    break;
                case "【二维码异常】OP10_A_QR code_Unknow":
                    if (language == "en")
                        message = "[QR code error]OP10_A_QRcode_Unknown";
                    else
                        message = "[Error QR]OP10_A_QRcode_Unknow";
                    break;
                case "OP10_A_伺服_不到位":
                    if (language == "en")
                        message = "OP10_A_Servo_Not in place";
                    else
                        message = "OP10_A_Servo_No está en su lugar";
                    break;
                case "OP10_B_伺服_不到位":
                    if (language == "en")
                        message = " OP10_B_Servo_Not in place";
                    else
                        message = "OP10_B_Servo_No está en su lugar";
                    break;
                case "OP10_移动检测伺服不到位":
                    if (language == "en")
                        message = "  OP10_Motion detection servo is not in place";
                    else
                        message = " OP10_Servo de detección de movimiento no en posicion";
                    break;
                case "【二维码异常】OP10_请正确比对生产码！":
                    if (language == "en")
                        message = "[QR code error]OP10_Compare the production code well！";
                    else
                        message = "[Error QR] OP10_Comparar bien código de producción";
                    break;
                case "【通信异常】OP10_上位机通信异常":
                    if (language == "en")
                        message = "[Communication error]OP10_Communication error with the host computer";
                    else
                        message = "[Error Comunicación]OP10_Error Comunicación con la computadora host";
                    break;
                case "【动作超时】OP10_A_上传":
                    if (language == "en")
                        message = "[Action Timeout]OP10_A_Upload";
                    else
                        message = "[Tiempo Excedido]OP10_A_Subir";
                    break;
                case "【动作超时】OP10_B_上传":
                    if (language == "en")
                        message = "[Action Timeout]OP10_B_Upload";
                    else
                        message = "[Tiempo Excedido]OP10_B_Subir";
                    break;

                case "【伺服轴故障】OP20_A_前后伺服_故障":
                    if (language == "en")
                        message = "[Servo axis failure] OP20_A_front and rear servo";
                    else
                        message = "[Falla Servoeje]OP20_A_servo del. y tra.";
                    break;
                case "【伺服轴故障】OP20_A_升降伺服_故障":
                    if (language == "en")
                        message = "[Servo axis failure] OP20_B_front and rear servo";
                    else
                        message = "[Falla Servoeje]OP20_B_servo del. y tra.";
                    break;
                case "【伺服轴故障】OP20_B_前后伺服_故障":
                    if (language == "en")
                        message = "[Servo axis failure]OP20_B_lift servo";
                    else
                        message = "[Falla Servoeje]OP20_B_servo elevacion";
                    break;
                case "【伺服轴故障】OP20_B_升降伺服_故障":
                    if (language == "en")
                        message = "[Servo axis failure]OP20_A_lift servo";
                    else
                        message = "[Falla Servoeje]OP20_A_servo elevacion";
                    break;
                case "【通讯异常】OP20__A端相机通讯异常":
                    if (language == "en")
                        message = "[Communication error]OP20__Camera on side A";
                    else
                        message = "[Error Comunicación]OP20__Cámara del lado A";
                    break;
                case "【通讯异常】OP20__B端相机通讯异常":
                    if (language == "en")
                        message = "[Communication error]OP20__Camera on side B";
                    else
                        message = "[Error Comunicación]OP20__Cámara del lado B";
                    break;
                case "【产品在位检测异常】OP20_初始化工站内有件报警！请移走！":
                    if (language == "en")
                        message = "[Product position detection failure]OP20_ Alarm in Initialization with a part to move";
                    else
                        message = "[Error detección Posición] OP20_ Alarma en Inicialización con tubos";
                    break;
                case "【动作超时】OP20_A_夹紧":
                    if (language == "en")
                        message = "[Action Timeout]OP20_A_Clamping";
                    else
                        message = "[Tiempo Excedido]OP20_A_Sujeción";
                    break;


                case "【动作超时】OP20_B_夹紧":
                    if (language == "en")
                        message = "[Action Timeout]OP20_B_Clamping";
                    else
                        message = "[Tiempo Excedido]OP20_B_Sujeción";
                    break;
                case "【动作超时】OP20_A_升降1":
                    if (language == "en")
                        message = "[Action Timeout]OP20_A_Lift1";
                    else
                        message = "[Tiempo Excedido]OP20_A_Elevación1";
                    break;
                case "【动作超时】OP20_A_耐压探针":
                    if (language == "en")
                        message = "[Action Timeout]OP20_A_Hipot Probe";
                    else
                        message = "[Tiempo Excedido]OP20_A_Hipot Sonda";
                    break;
                case "【动作超时】OP20_B_耐压探针":
                    if (language == "en")
                        message = "[Action Timeout]OP20_B_Hipot Probe";
                    else
                        message = "[Tiempo Excedido]OP20_B_Hipot Sonda";
                    break;
                case "【动作超时】OP20_B_升降1":
                    if (language == "en")
                        message = "[Action Timeout]OP20_B_Lift1";
                    else
                        message = "[Tiempo Excedido]OP20_B_Elevación1";
                    break;
                case "【动作超时】OP20_B_升降2":
                    if (language == "en")
                        message = "[Action Timeout]OP20_B_Lift2";
                    else
                        message = "[Tiempo de espera de acción]OP20_B_Elevación2";
                    break;

                case "【动作超时】OP20_A_升降2":
                    if (language == "en")
                        message = "[Action Timeout]OP20_A_Lift2";
                    else
                        message = "[Tiempo de espera de acción]OP20_A_Elevación2";
                    break;
                case "【动作超时】OP20_A_夹爪1":
                    if (language == "en")
                        message = "[Action Timeout]OP20_A_Clamp1";
                    else
                        message = "[Tiempo Excedido]OP20_A_Pinza1";
                    break;
                case "【动作超时】OP20_A_夹爪2":
                    if (language == "en")
                        message = "[Action Timeout]OP20_A_Clamp2";
                    else
                        message = "[Tiempo Excedido]OP20_A_Pinza2";
                    break;
                case "【动作超时】OP20_B_夹爪1":
                    if (language == "en")
                        message = "[Action Timeout]OP20_B_Clamp1";
                    else
                        message = "[Tiempo Excedido]OP20_B_Pinza1";
                    break;
                case "【动作超时】OP20_B_夹爪2":
                    if (language == "en")
                        message = "[Action Timeout]OP20_B_Clamp2";
                    else
                        message = "[Tiempo Excedido]OP20_B_Pinza2";
                    break;
                case "【动作超时】OP20_遮光罩":
                    if (language == "en")
                        message = "[Action Timeout]OP20_Light shielding cover";
                    else
                        message = "[Tiempo Excedido]OP20_Cubierta";
                    break;
                case "【产品在位检测异常】OP20_A_在位传感器":
                    if (language == "en")
                        message = "[Product position detection failure]OP20_A_Sensor in position";
                    else
                        message = "[Error detección Posición]OP20_A_Sensor en posición";
                    break;
                case "【产品在位检测异常】OP20_B_在位传感器":
                    if (language == "en")
                        message = "[Product position detection failure]OP20_B_Sensor in position";
                    else
                        message = "[Error detección Posición]OP20_B_Sensor en posición";
                    break;
                case "【通信异常】OP20_上位机通信异常":
                    if (language == "en")
                        message = "[Communication error]OP20_Communication error with the host computer";
                    else
                        message = "[Error Comunicación]OP20_Error Comunicación con la computadora host";
                    break;
                case "【动作超时】OP20_A_上传":
                    if (language == "en")
                        message = "[Action Timeout]OP20_A_Upload";
                    else
                        message = "[Tiempo Excedido]OP20_A_Subir";
                    break;
                case "【动作超时】OP20_B_上传":
                    if (language == "en")
                        message = "[Action Timeout]OP20_B_Upload";
                    else
                        message = "[Tiempo Excedido]OP20_B_Subir";
                    break;
                case "【连续NG】OP20_A_耐压测试":
                    if (language == "en")
                        message = "[Continuous NG]OP20_A_ HIPOT Inspection";
                    else
                        message = "[Continuo NG]OP20_A_ HIPOT Inspección";
                    break;
                case "【连续NG】OP20_B_耐压测试":
                    if (language == "en")
                        message = "[Continuous NG]OP20_B_ HIPOT Inspection";
                    else
                        message = "[Continuo NG]OP20_B_ HIPOT Inspección";
                    break;

                case "【通讯异常】OP30_有IO设备通讯异常":
                    if (language == "en")
                        message = "[Communication error]OP30_IO device communication abnormality";
                    else
                        message = "[Error Comunicación]OP30_Dispositivo IO";
                    break;


                case "【通讯异常】OP30_A通道伺服网络通讯异常":
                    if (language == "en")
                        message = "[Communication error]OP30_A Channel Servo network communication abnormality";
                    else
                        message = "[Error Comunicación]OP30_A Riel comunicación de servored";
                    break;
                case "【通讯异常】OP30_B通道伺服网络通讯异常":
                    if (language == "en")
                        message = "[Communication error]OP30_B Channel Servo network communication abnormality";
                    else
                        message = "[Error Comunicación]OP30_B Riel comunicación de servored";
                    break;
                case "【通讯异常】OP30_C通道伺服网络通讯异常":
                    if (language == "en")
                        message = "[Communication error]OP30_C Channel Servo network communication abnormality";
                    else
                        message = "[Error Comunicación]OP30_C Riel comunicación de servored";
                    break;
                case "【通讯异常】OP30_D通道伺服网络通讯异常":
                    if (language == "en")
                        message = "[Communication error]OP30_D Channel Servo network communication abnormality";
                    else
                        message = "[Error Comunicación]OP30_D Riel comunicación de servored";
                    break;
                case "【通讯异常】OP30_横移测试伺服网络通讯异常":
                    if (language == "en")
                        message = "[Communication error]OP30_Transverse motion test servo network communication abnormality";
                    else
                        message = "[Error Comunicación]OP30_Srevored de prueba transversal";
                    break;
                case "【通讯异常】OP30_线扫_A控制器通信异常":
                    if (language == "en")
                        message = "[Communication error]OP30_Line Scanning-A Controller Communication Exception";
                    else
                        message = "[Error Comunicación]Op30 escaneo de línea comunicación anormal del controlador A";
                    break;
                case "【通讯异常】OP30_线扫_B控制器通信异常":
                    if (language == "en")
                        message = "[Communication error]OP30_Line Scanning-B Controller Communication Exception";
                    else
                        message = "[Error Comunicación]Op30 escaneo de línea comunicación anormal del controlador B";
                    break;
                case "【通讯异常】OP30_膜厚控制器通信异常":
                    if (language == "en")
                        message = "[Communication error]OP30_Thickness laser controller communication abnormality\"";
                    else
                        message = "[Error Comunicación]OP30_Sensor de detección de curvatura";
                    break;
                case "【通讯异常】OP30_拱曲度控制器通信异常":
                    if (language == "en")
                        message = "[Communication error]OP30_ Arch curvature controller communication abnormality";
                    else
                        message = "[Error Comunicación]comunicación anormal del controlador de arco";
                    break;
                case "【通讯异常】OP30_A件数据扫描PC通讯故障":
                    if (language == "en")
                        message = "[Communication error]OP30_A piece Communication failure with data scanning PC";
                    else
                        message = "[Error en la comunicación]OP30_A pieza Fallo de comunicación con la PC de escaneo de datos";
                    break;
                case "【通讯异常】OP30_B件数据扫描PC通讯故障":
                    if (language == "en")
                        message = "[Communication error]OP30_B part Communication failure with data scanning PC";
                    else
                        message = "[Error en la comunicación]OP30_B pieza Fallo de comunicación con la PC de escaneo de datos";
                    break;
                case "【通信异常】OP30_膜厚PC软件通信异常":
                    if (language == "en")
                        message = "[Communication error]OP30_Thickness PC software communication abnormality";
                    else
                        message = "[Error Comunicación]OP30_Anormalidad en comunicación del software de PC de Thickness";
                    break;
                case "【伺服轴未回零】OP30_A通道伺服轴未回原点":
                    if (language == "en")
                        message = "[The servo axis does not return to zero]OP30_A Channel Servoaxis does not return to the origin.";
                    else
                        message = "[Servoeje no a cero]OP30_A Riel Servoeje no retorna al origen";
                    break;
                case "【伺服轴未回零】OP30_B通道伺服轴未回原点":
                    if (language == "en")
                        message = "[Servo axis does not return to zero]OP30_B Channel Servo axis does not return to origin";
                    else
                        message = "[Servoeje no a cero]OP30_B Riel Servoeje no retorna al origen";
                    break;
                case "【伺服轴未回零】OP30_C通道伺服轴未回原点":
                    if (language == "en")
                        message = "[The servo axis does not return to zero]OP30_C Channel Servoaxis does not return to the origin.";
                    else
                        message = "[Servoeje no a cero]OP30_C Riel Servoeje no retorna al origen";
                    break;
                case "【伺服轴未回零】OP30_D通道伺服轴未回原点":
                    if (language == "en")
                        message = "[The servo axis does not return to zero]OP30_D Channel Servoaxis does not return to the origin.";
                    else
                        message = "[Servoeje no a cero]OP30_D Riel Servoeje no retorna al origen";
                    break;
                case "【伺服轴未回零】OP30_横移测试轴伺服轴未回原点":
                    if (language == "en")
                        message = "[Servo axis does not return to zero]OP30_The transverse test axis servo axis does not return to the origin..";
                    else
                        message = "[Servoeje no a cero]OP30_Servoeje de prueba transversal";
                    break;



                case "【伺服轴未回零】OP30_A通道伺服轴故障":
                    if (language == "en")
                        message = "[Servo axis failure]OP30_A Channel Servo axis failure";
                    else
                        message = "[Falla Servoeje]OP30_A Riel";
                    break;
                case "【伺服轴未回零】OP30_B通道伺服轴故障":
                    if (language == "en")
                        message = "[Servo axis failure]OP30_B Channel Servo axis failure";
                    else
                        message = "[Falla Servoeje]OP30_B Riel";
                    break;
                case "【伺服轴未回零】OP30_C通道伺服轴故障":
                    if (language == "en")
                        message = "[Servo axis failure]OP30_C Channel Servo axis failure";
                    else
                        message = "[Falla Servoeje]OP30_C Riel";
                    break;
                case "【伺服轴未回零】OP30_D通道伺服轴故障":
                    if (language == "en")
                        message = "[Servo axis failure]OP30_D Channel Servo axis failure";
                    else
                        message = "[Falla Servoeje]OP30_D Riel";
                    break;
                case "【伺服轴未回零】OP30_横移测试伺服轴故障":
                    if (language == "en")
                        message = "[Servo axis failure]OP30_Transverse test servo axis failure";
                    else
                        message = "[Falla Servoeje]OP30_Servoeje de prueba transversal";
                    break;
                case "【伺服轴故障】OP30_A通道伺服轴故障":
                    if (language == "en")
                        message = "[Servo axis failure]OP30_A Channel Servo axis failure";
                    else
                        message = "[Falla Servoeje]OP30_A Riel";
                    break;
                case "【伺服轴故障】OP30_B通道伺服轴故障":
                    if (language == "en")
                        message = "[Servo axis failure]OP30_B Channel Servo axis failure";
                    else
                        message = "[Falla Servoeje]OP30_B Riel";
                    break;
                case "【伺服轴故障】OP30_C通道伺服轴故障":
                    if (language == "en")
                        message = "[Servo axis failure]OP30_C Channel Servo axis failure";
                    else
                        message = "[Falla Servoeje]OP30_C Riel";
                    break;
                case "【伺服轴故障】OP30_D通道伺服轴故障":
                    if (language == "en")
                        message = "[Servo axis failure]OP30_D Channel Servo axis failure";
                    else
                        message = "[Falla Servoeje]OP30_D Riel";
                    break;
                case "【伺服轴故障】OP30_横移测试伺服轴故障":
                    if (language == "en")
                        message = "[Servo axis failure]OP30_Transverse test servo axis failure";
                    else
                        message = "[Falla Servoeje]OP30_Servoeje de prueba transversal";
                    break;

                case "【提示】OP30_横移测试伺服未在安全位,请手动移动":
                    if (language == "en")
                        message = "[Warning] OP30_The transverse test servo is not in the safe position, please move it manually";
                    else
                        message = "[Advertencia]OP30_Servo de prueba transversal no está en posición segura, mueva manual";
                    break;
                case "【提示】OP30_移动测试伺服,请上下解锁气缸缩回,ABCD回原点或者上下件位":
                    if (language == "en")
                        message = "[Warning]OP30_Test servo moving, lift release cylinder retracts, ABCD returns to origin or part position";
                    else
                        message = "[Advertencia]OP30_Servo de prueba movil, cilindro de desbloqueo de elevación se retrae, ABCD vuelve al origen o su posición";
                    break;
                case "【动作超时】OP30_A_上料解锁":
                    if (language == "en")
                        message = "[Action Timeout]OP30_A_Load Unlock";
                    else
                        message = "[Tiempo Excedido]OP30_A_Desbloqueo de carga";
                    break;
                case "【动作超时】OP30_B_上料解锁":
                    if (language == "en")
                        message = "[Action Timeout]OP30_B_Load Unlock";
                    else
                        message = "[Tiempo Excedido]OP30_B_Desbloqueo de carga";
                    break;
                case "【动作超时】OP30_C_上料解锁":
                    if (language == "en")
                        message = "[Action Timeout]OP30_C_Load Unlock";
                    else
                        message = "[Tiempo Excedido]OP30_C_Desbloqueo de carga";
                    break;
                case "【动作超时】OP30_D_上料解锁":
                    if (language == "en")
                        message = "[Action Timeout]OP30_D_Load Unlock";
                    else
                        message = "[Tiempo Excedido]OP30_D_Desbloqueo de carga";
                    break;
                case "【动作超时】OP30_A_下料解锁":
                    if (language == "en")
                        message = "[Action Timeout]OP30_A_Download Unlock";
                    else
                        message = "[Tiempo Excedido]OP30_A_Desbloqueo de descarga";
                    break;
                case "【动作超时】OP30_B_下料解锁":
                    if (language == "en")
                        message = "[Action Timeout]OP30_B_Download Unlock";
                    else
                        message = "[Tiempo Excedido]OP30_B_Desbloqueo de descarga";
                    break;
                case "【动作超时】OP30_C_下料解锁":
                    if (language == "en")
                        message = "[Action Timeout]OP30_C_Download Unlock";
                    else
                        message = "[Tiempo Excedido]OP30_C_Desbloqueo de descarga";
                    break;
                case "【动作超时】OP30_D_下料解锁":
                    if (language == "en")
                        message = "[Action Timeout]OP30_D_Download Unlock";
                    else
                        message = "[Tiempo Excedido]OP30_D_Desbloqueo de descarga";
                    break;


                case "【动作超时】OP30_A通道点激光关闭无响应":
                    if (language == "en")
                        message = "[Action Timeout]OP30_A Channel Laser Pointer Off Does Not Respond";
                    else
                        message = "[Tiempo Excedido]OP30_A Riel Puntero láser desactivado no responde";
                    break;
                case "【动作超时】OP30_AB通道_膜厚气缸":
                    if (language == "en")
                        message = "[Action Timeout]OP30_AB Channel_Thickness Cylinder";
                    else
                        message = "[Tiempo Excedido]OP30_AB Riel_Cilindro de Thickness";
                    break;
                case "【动作超时】OP30_CD通道_膜厚气缸":
                    if (language == "en")
                        message = "[Action Timeout]OP30_CD Channel_Thickness Cylinder";
                    else
                        message = "[Tiempo Excedido]OP30_CD Riel_Cilindro de Thickness";
                    break;

                case "【动作超时】OP30_A线扫开启":
                    if (language == "en")
                        message = "[Action waiting time]OP30_A Load Channel";
                    else
                        message = "[Tiempo Excedido]OP30_A Riel Carga";
                    break;
                case "【动作超时】OP30_B线扫开启":
                    if (language == "en")
                        message = "[Action Timeout]OP30_B Channel Laser Pointer Activated Does Not Respond";
                    else
                        message = "[Tiempo Excedido]OP30_A Riel Puntero láser activado no responde";
                    break;
                case "【动作超时】OP30_A扫描完成":
                    if (language == "en")
                        message = "[Action Timeout]OP30_A Channel Laser Pointer Activated Does Not Respond";
                    else
                        message = "[Tiempo Excedido]OP30_A Riel Puntero láser activado no responde";
                    break;
                case "【动作超时】OP30_B扫描完成":
                    if (language == "en")
                        message = "[Action Timeout]OP30_B Channel Laser Pointer Not Responding";
                    else
                        message = "[Tiempo Excedido]OP30_B Riel Puntero láser no responde";
                    break;
                case "【动作超时】OP30_A上传":
                    if (language == "en")
                        message = "[Action waiting time]OP30_A Load Channel";
                    else
                        message = "[Tiempo Excedido]OP30_A Riel Carga";
                    break;
                case "【动作超时】OP30_B上传":
                    if (language == "en")
                        message = "[Action waiting time]OP30_B Load Channel";
                    else
                        message = "[Tiempo Excedido]OP30_B Riel Carga";
                    break;
                case "【动作超时】OP30_A通道点激光开启无响应":
                    if (language == "en")
                        message = "[Action Timeout]OP30_A Channel Laser Pointer Activated Does Not Respond";
                    else
                        message = "[Tiempo Excedido]OP30_A Riel Puntero láser activado no responde";
                    break;


                case "【动作超时】OP30_B通道点激光开启无响应":
                    if (language == "en")
                        message = "[Action waiting time]OP30_B Load Channel";
                    else
                        message = "[Tiempo Excedido]OP30_B Riel Carga";
                    break;
                case "【动作超时】OP30_B通道点激光关闭无响应":
                    if (language == "en")
                        message = "[Action Timeout]OP30_B Channel Laser Pointer Not Responding";
                    else
                        message = "[Tiempo Excedido]OP30_B Riel Puntero láser no responde";
                    break;
                case "【动作超时】OP30_存储膜厚超时":
                    if (language == "en")
                        message = "[Action Timeout]OP30_Save Thickness";
                    else
                        message = "[Tiempo Excedido]OP30_Guardar Thickness";
                    break;
                case "【动作超时】OP30_分析膜厚超时":
                    if (language == "en")
                        message = "[Action Timeout]OP30_Analyze Thickness";
                    else
                        message = "[Tiempo Excedido]OP30_Analizar Thickness";
                    break;
                case "【动作超时】OP30_清除膜厚数据超时":
                    if (language == "en")
                        message = "[Action Timeout]OP30__Clear film thickness data";
                    else
                        message = "[Tiempo Excedido]OP30__Borrar datos de Thickness";
                    break;
                case "【通讯异常】OP30_点激光不在线":
                    if (language == "en")
                        message = "[Communication error]OP30_laser pointer is not online";
                    else
                        message = "[Error Comunicación]OP30_Puntero láser no está en línea";
                    break;
                case "【动作超时】OP30_上位机通信超时":
                    if (language == "en")
                        message = "[Action Timeout]OP30_Host Computer Communication Timeout";
                    else
                        message = "[Tiempo Excedido]OP30_Comunicación de computadora host";
                    break;
                case "【产品在位检测异常】OP30_A通道上料头光电异常":
                    if (language == "en")
                        message = "[Product position detection failure]OP30_A channel loading head photoelectric abnormality";
                    else
                        message = "[Error detección Posición]OP30_A Riel Fotoeléctrica de Cabezal de carga";
                    break;
                case "【产品在位检测异常】OP30_B通道上料头光电异常":
                    if (language == "en")
                        message = "[Product position detection failure]OP30_B channel loading head photoelectric abnormality";
                    else
                        message = "[Error detección Posición]OP30_B Riel Fotoeléctrica de Cabezal de carga";
                    break;
                case "【产品在位检测异常】OP30_C通道上料头光电异常":
                    if (language == "en")
                        message = "[Product position detection failure]OP30_C channel loading head photoelectric abnormality";
                    else
                        message = "[Error detección Posición]OP30_C Riel Fotoeléctrica de Cabezal de carga";
                    break;
                case "【产品在位检测异常】OP30_D通道上料头光电异常":
                    if (language == "en")
                        message = "[Product position detection failure]OP30_D channel loading head photoelectric abnormality";
                    else
                        message = "[Error detección Posición]OP30_D Riel Fotoeléctrica de Cabezal de carga";
                    break;
                case "【连续NG】OP30_A通道立面拱曲度异常，请检查垫块并确认":
                    if (language == "en")
                        message = "[Continuous NG]OP30_A Channel Camber Failure, check pads";
                    else
                        message = "[Continuo NG]OP30_A Riel Fallo Camber, verifique las almohadillas";
                    break;
                case "【连续NG】OP30_B通道立面拱曲度异常，请检查垫块并确认":
                    if (language == "en")
                        message = "[Continuous NG]OP30_B Channel Camber Failure, check pads";
                    else
                        message = "[Continuo NG]OP30_B Riel Fallo Camber, verifique las almohadillas";
                    break;
                case "【连续NG】OP30_C通道立面拱曲度异常，请检查垫块并确认":
                    if (language == "en")
                        message = "[Continuous NG]OP30_C Channel Camber Failure, check pads";
                    else
                        message = "[Continuo NG]OP30_C Riel Fallo Camber, verifique las almohadillas";
                    break;
                case "【连续NG】OP30_D通道立面拱曲度异常，请检查垫块并确认":
                    if (language == "en")
                        message = "[Continuous NG]OP30_D Channel Camber Failure, check pads";
                    else
                        message = "[Continuo NG]OP30_D Riel Fallo Camber, verifique las almohadillas";
                    break;
                case "【产品在位检测异常】OP30_A通道上料尾光电异常":
                    if (language == "en")
                        message = "[Product position detection failure]OP30_A channel loading tail photoelectric abnormality";
                    else
                        message = "[Error detección Posición]OP30_A Riel Fotoeléctrica del final de carga";
                    break;
                case "【产品在位检测异常】OP30_B通道上料尾光电异常":
                    if (language == "en")
                        message = "[Product position detection failure]OP30_B channel loading tail photoelectric abnormality";
                    else
                        message = "[Error detección Posición]OP30_B Riel Fotoeléctrica del final de carga";
                    break;
                case "【产品在位检测异常】OP30_C通道上料尾光电异常":
                    if (language == "en")
                        message = "[Product position detection failure]OP30_C channel loading tail photoelectric abnormality";
                    else
                        message = "[Error detección Posición]OP30_C Riel Fotoeléctrica del final de carga";
                    break;
                case "【产品在位检测异常】OP30_D通道上料尾光电异常":
                    if (language == "en")
                        message = "[Product position detection failure]OP30_D channel loading tail photoelectric abnormality";
                    else
                        message = "[Error detección Posición]OP30_D Riel Fotoeléctrica del final de carga";
                    break;
                default:
                    message = messageCode;
                    break;
            }
            return message;
        }
    }

}
